#include <boost/asio.hpp>
#include <boost/noncopyable.hpp>
#include <memory>

class ThreadExecutor : private boost::noncopyable
{
public:
	ThreadExecutor();
	~ThreadExecutor();

	template<typename TaskType>
	void Runtask(TaskType task)
	{
		boost::asio::post(io_context_,task);
	}


private:
	boost::asio::io_context io_context_;
	std::unique_ptr<std::thread> thread_;
    //std::thread *thread_;
	boost::asio::io_context::work wk_;
};